﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="WebComicPage.Search" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Search</title>
    <link href="Presention/ComicShopStyle.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <header>
                <h2>
                    <img src="Images/pow.jpg" width="50" height="30" />
                    Comics Shop Web Service by Nadav Lichtenshtein & Idan Morad
                </h2>
            </header>
            <section>
                <center><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/RestfullsApi.html" CssClass="navButton">Search via Wikipedia</asp:HyperLink></center>
                <p align="center">
                <asp:Label ID="Label1" runat="server" Text="Search a Comic Book by Title: " />
                <asp:TextBox ID="txbSearchByTitle" runat="server" />
                <asp:Button ID="btnSearchByTitle" runat="server" Text="Search" OnClick="btnSearchByTitle_Click" />
                </p>
                <p align="center">
                <asp:Label ID="Label2" runat="server" Text="Search a Comic Book by Category: "></asp:Label>
                <asp:DropDownList ID="ddlSearchByCategory" runat="server" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="Name"></asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:comicShopConnectionString %>" SelectCommand="SELECT [Name] FROM [Category] ORDER BY [Name]"></asp:SqlDataSource>
                <asp:Button ID="btnSearchByCategory" runat="server" Text="Search" OnClick="btnSearchByCategory_Click" />
                </p>
                <p align="center">
                <asp:Label ID="Label3" runat="server" Text="Search a Comic Book by Publisher: "></asp:Label>
                <asp:DropDownList ID="ddlSearchByPublisher" runat="server" DataSourceID="SqlDataSource2" DataTextField="Name" DataValueField="Name"></asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:comicShopConnectionString %>" SelectCommand="SELECT [Name] FROM [Publisher] ORDER BY [Name]"></asp:SqlDataSource>
                <asp:Button ID="btnSearchByPublisher" runat="server" Text="Search" OnClick="btnSearchByPublisher_Click" />
                </p>
                <br/>
                <br/>
                <asp:GridView ID="resultView" runat="server" />
                <br/>
                <asp:Label ID="lblError" runat="server" Text="WebService is down" ForeColor="red" Font-Bold="True" Visible="False"></asp:Label>
            </section>
            <footer>
                <p align="center">
                    <strong>
                        <a href="mailto:idanmora@post.bgu.ac.il" class="contactButton">Contact Us!</a><br />
                        This site was build as fourth assignment in Internet Programming Environments course.
                    </strong>
                </p>
            </footer>
        </div>
    </form>
</body>
</html>
